<?php
if (isset($_POST['o']) &&  !empty($_POST['o']) ){
    include 'load.php';
    $openid=$_POST['o'];
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $a=$b='';
    $query=$mysqli->query("SELECT isold,queren FROM `uinfo` where openid='".$openid."' limit 0,1 ");
    if($query->num_rows>0){
         $getU=$query->fetch_array();
         $isold=$getU['isold'];
         if ($getU['queren'] == 'yes'){
             $a='yes';
         }
         if ('new' == $isold){
             $query=$mysqli->query("SELECT count(id) as count FROM `share` where openid='".$openid."'  ");
             $countInfo=$query->fetch_array();
             if ($countInfo['count'] > 1){
                 $b='yes';
             }
         }else{
             if (!empty($isold)){
                 $b='yes';
             }
         }
    }
    $has='yes';
    if (empty($a) && empty($b)){
        $has='no';
    }
    echo json_encode(array('h'=>$has));
    $mysqli->close();
}